home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _INetSmtpMail.au3 < prev    next >
Text File  |  2006-06-17  |  535b  |  18 lines

  1. #include <INet.au3>
  2.  
  3. $s_SmtpServer = "mysmtpserver.com.au"
  4. $s_FromName = "My Name"
  5. $s_FromAddress = "From eMail Address"
  6. $s_ToAddress = "To eMail Address"
  7. $s_Subject = "My Test UDF"
  8. Dim $as_Body[2]
  9. $as_Body[0] = "Testing the new email udf"
  10. $as_Body[1] = "Second Line"
  11. $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
  12. $err = @error
  13. If $Response = 1 Then
  14.     MsgBox(0, "Success!", "Mail sent")
  15. Else
  16.     MsgBox(0, "Error!", "Mail failed with error code " & $err)
  17. EndIf
  18.